Adwaita: fix bogus rounded corners on split headerbars
authorLapo Calamandrei <calamandrei@gmail.com>
Tue, 22 Dec 2015 10:53:27 +0000 (11:53 +0100)
committerLapo Calamandrei <calamandrei@gmail.com>
Tue, 22 Dec 2015 10:53:27 +0000 (11:53 +0100)
we have to do some assumptions for css selectors limits for this
particular case, so for split headerbars to work correctly the
actual haderbars need not to have the titlebar class applied.

gtk/theme/Adwaita/_common.scss
gtk/theme/Adwaita/gtk-contained-dark.css
gtk/theme/Adwaita/gtk-contained.css

index fd40259ad69e3fb32d94777eb4d10fd253b9df71..de2f23e6d3e44034f33028ebf01fa4f390d24858 100644 (file)
@@ -1086,7 +1086,8 @@ headerbar {
   border-width: 0 0 1px;
   border-style: solid;
   border-color: $borders_color;
-  border-radius: 7px 7px 0 0;
+  border-radius: 0;
+
   background-color: transparent;
 
   @include headerbar_fill;
@@ -1254,13 +1255,28 @@ headerbar {
   }
 }
 
+.titlebar {
+  &, &:backdrop {
+    border-top-left-radius: 7px;
+    border-top-right-radius: 7px;
+  }
+}
+
+headerbar {
+  separator:first-child + &, // tackles the paned container case
+  &:first-child { &, &:backdrop { border-top-left-radius: 7px; }}
+  &:last-child { &, &:backdrop { border-top-right-radius: 7px; }}
+}
+
 .titlebar:not(headerbar) {
   window.csd > & {
     // in csd we assume every titlebar is a headerbar so reset anything, this is needed for split toolbars cases
     padding: 0;
-    border-style: none;
+    background-color: transparent;
     background-image: none;
+    border-style: none;
     border-color: transparent;
+    box-shadow: none;
   }
   @extend %titlebar;
 }
index b410f870cb534f2524adfa74af87f8254f736d69..13a7b103dac5149102ae818a4b07939351dca89a 100644 (file)
@@ -1605,7 +1605,7 @@ headerbar {
   border-width: 0 0 1px;
   border-style: solid;
   border-color: #1c1f1f;
-  border-radius: 7px 7px 0 0;
+  border-radius: 0;
   background-color: transparent;
   background-image: linear-gradient(to top, #2a2f2f, #2f3434 2px, #323737 3px);
   box-shadow: inset 0 1px rgba(238, 238, 236, 0.07); }
@@ -1927,11 +1927,22 @@ headerbar {
     .titlebar headerbar.default-decoration button.titlebutton {
       padding: 5px; }
 
+.titlebar, .titlebar:backdrop {
+  border-top-left-radius: 7px;
+  border-top-right-radius: 7px; }
+
+separator:first-child + headerbar, separator:first-child + headerbar:backdrop, headerbar:first-child, headerbar:first-child:backdrop {
+  border-top-left-radius: 7px; }
+headerbar:last-child, headerbar:last-child:backdrop {
+  border-top-right-radius: 7px; }
+
 window.csd > .titlebar:not(headerbar) {
   padding: 0;
-  border-style: none;
+  background-color: transparent;
   background-image: none;
-  border-color: transparent; }
+  border-style: none;
+  border-color: transparent;
+  box-shadow: none; }
 
 /************
  * Pathbars *
index 4621e912c6c8747f72795b82253fb295de467b6f..fc1734a164fd084335dc63f1cfde9fa1c6a081ed 100644 (file)
@@ -1605,7 +1605,7 @@ headerbar {
   border-width: 0 0 1px;
   border-style: solid;
   border-color: #9d9d99;
-  border-radius: 7px 7px 0 0;
+  border-radius: 0;
   background-color: transparent;
   background-image: linear-gradient(to top, #d4d4d2, #efefef 2px, #f4f4f4 3px);
   box-shadow: inset 0 1px rgba(255, 255, 255, 0.8); }
@@ -1927,11 +1927,22 @@ headerbar {
     .titlebar headerbar.default-decoration button.titlebutton {
       padding: 5px; }
 
+.titlebar, .titlebar:backdrop {
+  border-top-left-radius: 7px;
+  border-top-right-radius: 7px; }
+
+separator:first-child + headerbar, separator:first-child + headerbar:backdrop, headerbar:first-child, headerbar:first-child:backdrop {
+  border-top-left-radius: 7px; }
+headerbar:last-child, headerbar:last-child:backdrop {
+  border-top-right-radius: 7px; }
+
 window.csd > .titlebar:not(headerbar) {
   padding: 0;
-  border-style: none;
+  background-color: transparent;
   background-image: none;
-  border-color: transparent; }
+  border-style: none;
+  border-color: transparent;
+  box-shadow: none; }
 
 /************
  * Pathbars *